<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
		  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:sf="http://www.springframework.org/tags/faces"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:c="http://java.sun.com/jstl/core"
  template="/WEB-INF/layouts/standard.xhtml">

  <ui:define name="menu">

  </ui:define>

  <ui:define name="content">
    <!-- INCLUDE CONTENT -->
    <h1 class="pageTitle">Welcome to the JAWP application</h1>

    <div>
      <div class="introText">Ut dictum velit quis quam dignissim
        gravida. Nunc nec diam lectus. Aenean aliquam varius mattis.
        Etiam lobortis tempor justo, imperdiet vestibulum mi lacinia at.
        Aliquam fringilla vestibulum nisl, tempor.</div>
      <img src="../images/Projet2.png" width="200px" height="156px"
        class="logoCart" alt="cart" />
    </div>

    <div>
      <div class="left">
        <h2>What's it ?</h2>
        Morbi risus est, ullamcorper et iaculis a, tincidunt quis lacus.
        Duis venenatis mollis tellus, ut pharetra purus sagittis vel.
        Class aptent taciti sociosqu ad litora torquent per conubia
        nostra, per inceptos himenaeos. In ultricies pellentesque arcu,
        vitae placerat urna consequat eget. Proin egestas iaculis
        egestas. Integer ultrices lacus vitae augue ornare mollis auctor
        arcu tempor. Sed rutrum egestas ultrices. Aliquam scelerisque
        iaculis nunc, eget ornare augue facilisis non. Etiam fermentum
        arcu tincidunt orci eleifend non auctor orci malesuada. Mauris
        vel lacus dapibus libero venenatis posuere in eu dui.
      </div>
      <div class="right">
        <h2>Login Required</h2>
        <span>Please enter your login and password to enter in
          application.</span>

        <div class="section">
          <c:if test="${not empty param.login_error}">
            <div class="errors">
              Your login attempt was not successful, try again.<br />
              Reason:
              #{sessionScope.SPRING_SECURITY_LAST_EXCEPTION.message}
            </div>
          </c:if>
          <br />
        </div>

        <div class="section">
          <form name="log"
            action="${request.contextPath}/flow/loginProcess"
            method="post">

            <c:if test="${conversationScope.loginError == true}">
              <c:set var="username"
                value="${sessionScope.SPRING_SECURITY_LAST_USERNAME}" />
            </c:if>

            <fieldset>
              <h:panelGrid border="0" columns="3">
                <h:outputText value="User :" />
                <h:inputText required="true" value="#{username}"
                  id="j_username" name="j_username"
                  requiredMessage="Please enter a login" maxlength="50" />
                <h:message for="j_username" styleClass="errlogin"
                  size="6" />

                <h:outputText value="Password :" />
                <h:inputSecret required="true" name="j_password"
                  id="j_password"
                  requiredMessage="Please enter a password" />
                <h:message for="j_password" styleClass="errpassword" />
              </h:panelGrid>

              <br />

              <div class="field">
                <div class="label" id="ask">
                  Don't ask for my password for two weeks: <input
                    type="checkbox" name="_spring_security_remember_me" />
                </div>
              </div>

              <br />

              <div class="buttonGroup">
                <input name="submit" type="submit" value="Login"
                  title="keith/melbourne" />
              </div>
            </fieldset>
          </form>
        </div>

        <div class="section">
          <h:form>
            <h:commandLink class="label" action="lostpwd"
              value="password lost" title="password lost" />

            <h:outputText value=" - " />

            <h:commandLink class="label" action="help" value="help" />
          </h:form>
        </div>

        <h:form>
          <div class="inscriptionButton">
            <h:commandLink action="registry">
              <h:graphicImage value="../images/inscription.png"
                alt="Sign up" title="Sign up" />
            </h:commandLink>
          </div>
        </h:form>

      </div>


    </div>
  </ui:define>
</ui:composition>
